Closed
Bug 505723
Opened 16 years ago
Closed 16 years ago
nsWifiMonitor::DoScan seems to leak iwlib_handle after ReplaceArray(lastAccessPoints, accessPoints)
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity, memory-leak)
Attachments
(1 file, 2 obsolete files)
2.09 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
130 nsWifiMonitor::DoScan()
132 void* iwlib_handle = dlopen("libiw.so", RTLD_NOW);
148 if (!iw_open || !iw_enum || !iw_stats) {
149 dlclose(iwlib_handle);
156 if (skfd < 0) {
157 dlclose(iwlib_handle);
186 ReplaceArray(lastAccessPoints, accessPoints);
191 nsIWifiAccessPoint** result = static_cast<nsIWifiAccessPoint**> (nsMemory::Alloc(sizeof(nsIWifiAccessPoint*) * resultCount));
192 if (!result)
193 return NS_ERROR_OUT_OF_MEMORY;
229 iw_sockets_close(skfd);
231 return NS_OK;
Assignee: nobody → timeless
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #390131 -
Flags: review?(doug.turner)
Comment 2•16 years ago
|
||
Comment on attachment 390131 [details] [diff] [review]
patch
got tabs in the patch, but otherwise fine.
Attachment #390131 -
Flags: review?(doug.turner) → review+
Comment 3•16 years ago
|
||
Comment on attachment 390131 [details] [diff] [review]
patch
iw_stats is used elsewhere in this file.
Attachment #390131 -
Flags: review+ → review-
Comment 4•16 years ago
|
||
josh, you could try something like this?
yeah, that makes sense.
for reference, the reason i moved those things out of global scope is that if you load/unload libraries, you *really* don't want stale pointers floating around.
Attachment #390131 -
Attachment is obsolete: true
Attachment #390147 -
Attachment is obsolete: true
Attachment #390172 -
Flags: review?(doug.turner)
Updated•16 years ago
|
Attachment #390172 -
Flags: review?(doug.turner) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•